//
//  BBussinessLicenseShowVC.m
//  DistributorAB
//
//  Created by LZY on 2019/10/8.
//  Copyright © 2019 主事丫环. All rights reserved.
//

#import "BBussinessLicenseShowVC.h"
#import "CSPersonModel.h"

@interface BBussinessLicenseShowVC ()
@property (nonatomic, strong) UIImageView *ivImage;//图片
@end

@implementation BBussinessLicenseShowVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self.leftbutton setImage:imgname(@"left_icon") forState:(UIControlStateNormal)];
    self.view.backgroundColor = kColorWithHex(0xf2f2f2);
    self.title = @"营业执照";
    
}
#pragma mark - 界面布局方法
- (void)setupViewAction{
    UIView *viewBg = [[UIView alloc] initWithFrame:CGRectMake(0, kNaviHeight, kScreen_Width, 225)];
    viewBg.backgroundColor = kColorWithHex(0xffffff);
    [self.view addSubview:viewBg];
    
    UIImageView *ivNotice = [[UIImageView alloc] initWithFrame:CGRectMake(16, 19, 19, 15)];
    ivNotice.image = [UIImage imageNamed:@"user_bussiness_license_icon"];
    [viewBg addSubview:ivNotice];
    
    UILabel *lblNotice = [[UILabel alloc] initWithFrame:CGRectMake(47, 16.5, kScreen_Width - 94, 20)];
    lblNotice.text = @"营业执照";
    lblNotice.textColor = kColorWithHex(0x333333);
    lblNotice.font = [UIFont boldSystemFontOfSize:14];
    [viewBg addSubview:lblNotice];
    
    _ivImage = [[UIImageView alloc] initWithFrame:CGRectMake(16, 44, 100, 100)];
    [viewBg addSubview:_ivImage];
    if ([self.model.image_url hasPrefix:@"http"]) {
        [_ivImage sd_setImageWithURL:[NSURL URLWithString:self.model.image_url] placeholderImage:nil];
    }else{
        sdimg(_ivImage,self.model.image_url);
    }
}
- (void)setModel:(CSPersonModel *)model{
    if (model) {
        _model = model;
        [self setupViewAction];
    }
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
